package com.wowoai.common.basemodule;

import com.wowoai.common.enums.ResponseEnum;
import lombok.Getter;

/**
 * 自定义异常
 */
@Getter
public class BusinessException extends RuntimeException{
    private final int errorCode;
    private final String errorMessage;

    public BusinessException(int errorCode,String errorMessage){
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
    public BusinessException(String errorMessage){
        this.errorCode = ResponseEnum.FAIL.getCode();
        this.errorMessage = errorMessage;
    }
}
